#include<stdio.h>
#include"List.h"

void print(SLNode* head)
{
	SLNode* Head = head;
	head = head->next;
	printf("Head<->");
	while (Head != head)
	{
		printf("%d<->", head->data);
		head = head->next;
	}
	printf("Head\n");
}


void test1()
{
	SLNode* list1 = SLInit();
	SLPushBack(list1, 1);
	SLPushBack(list1, 2);
	SLPushBack(list1, 3);
	SLPushBack(list1, 4);
	SLPushFront(list1, 11);
	SLPushFront(list1, 22);
	print(list1);
	printf("Del = %d\n", SLPopBack(list1)); print(list1);
	printf("Del = %d\n", SLPopFront(list1)); print(list1);

	SLDestroy(&list1);
}

int main()
{
	test1();

	return 0;
}